package com.example.multithreading;

import java.time.Duration;

public class ch03_05 {
    public static void main(String[] args) {
       Thread t1 =new Thread();
        System.out.println("t1的优先级= "+t1.getPriority());

        Thread t2 =new Thread(){
            public void run(){
                Thread t3 =new Thread();
                System.out.println("t3的优先级= "+t3.getPriority());
                System.out.println("t3"+t3.getId());
            }

        };
        t2.setPriority(6);
        t2.start();
        System.out.println("t2的优先级= "+t2.getPriority());
        long id = t1.getId();
        System.out.println("t1"+t1.getId()); //获取的线程id
        System.out.println("t2"+t2.getId());

    }
}
